<?php
namespace app\validate;

use think\Validate;

class CheckCourse extends Validate
{

    protected $rule =   [
        'seminar'  => 'require|length:1,150',
        'e_seminar'  => 'require|length:1,150',
        'courseid'  => 'require|number',
        'type'  => 'require|number',
        'seminar_topic'  => 'require|number',
        'english'  => 'require|number',
        'level'  => 'require|number',
    ];

    protected $message  =   [
        'seminar.require' => '请填写课程标题！',
        'seminar.length' => '课程标题在1-150个字符之间！',
        'e_seminar.require' => '请填写Seminar(en)！',
        'e_seminar.length' => 'Seminar(en)在1-150个字符之间！',
        'courseid.require' => '请填写Courseid！',
        'courseid.number' => 'Courseid为数字！',
        'type.require' => '请选择课程属性！',
        'type.number' => '课程属性为数字！',
        'seminar_topic.require' => '请选择课程分类！',
        'seminar_topic.number' => '课程分类为数字！',
        'english.require' => '请选择英语等级！',
        'english.number' => '英语等级为数字！',
        'level.require' => '请选择课程等级！',
        'level.number' => '课程等级为数字！',
    ];

}